package com.hlf.modules.merchant.store.service.impl;


import com.hlf.common.constants.Constants;
import com.hlf.modules.merchant.store.entity.Mcc;
import com.hlf.modules.merchant.store.mapper.MccMapper;
import com.hlf.modules.merchant.store.service.MccService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MccServiceImpl implements MccService {

	@Autowired
	private MccMapper mccMapper;
	
	@Override
	public String deleteByPrimaryKey(Integer id) {
		mccMapper.deleteByPrimaryKey(id);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public String insert(Mcc record) {
		mccMapper.insert(record);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public String insertSelective(Mcc record) {
		mccMapper.insertSelective(record);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public Mcc selectByPrimaryKey(Integer id) {
		return mccMapper.selectByPrimaryKey(id);
	}

	@Override
	public String updateByPrimaryKeySelective(Mcc record) {
		mccMapper.updateByPrimaryKeySelective(record);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public String updateByPrimaryKey(Mcc record) {
		mccMapper.updateByPrimaryKey(record);
		return Constants.DEFAULT_MSG_SUCCESS;
	}

	@Override
	public List<Mcc> selectMccByType(Mcc mcc) {
		return mccMapper.selectMccByType(mcc);
	}

	@Override
	public List<Integer> selectSecondTypeByFirst(int firstType) {
		return mccMapper.selectSecondTypeByFirst(firstType);
	}

}
